@extends('Admin.layout.layout')
@section('title','用户添加')
@section('weizhi','用户添加')
@section('con')

@if(session('error'))
	<div class="alert alert-danger">
		{{session('error')}}
	</div>div>
@endif

@if (count($errors) > 0)
    <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
<div class="row">
    <div class="col-lg-6 col-lg-offset-3">
        <div class="panel panel-default">
            {{session('error')}}
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-12">
                        <form role="form" action="{{url('/admin/user/insert')}}" method="post">
                            <div class="form-group">
                                <label>用户名:</label>
                                <input class="form-control" type="text" name="username" value="{{old('username')}}">
                            </div>
                            <div class="form-group">
                                <label>密码:</label>
                                <input class="form-control" type="password" name="password" value="{{old('password')}}">
                            </div>
                            <div class="form-group">
                                <label>确认密码:</label>
                                <input class="form-control" type="password" name="repassword" value="{{old('repassword')}}">
                            </div>
                            <div class="form-group">
                                <label>邮箱:</label>
                                <input class="form-control" type="text" name="useremail" value="{{old('email')}}">
                            </div>
                            <div class="form-group">
                                <label>手机:</label>
                                <input class="form-control" type="text" name="userphone" value="{{old('phone')}}">
                            </div>
                            {{csrf_field()}}
                            <button class="btn btn-primary col-lg-6 col-lg-offset-3" >添加</button>
                        </form>
                    </div>
                    
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>


@endsection